
import 'exception_reason.dart';

/**
 * @Author: LIBOYA
 * @CreateDate: 2019/9/24
 * @Description:
 */

class NetError implements Exception {
  int errCode;
  String errMsg;
  dynamic data;

  NetError({required this.errCode, required this.errMsg, this.data}) {
    if (this.errMsg.isEmpty) {
      this.errMsg = ExceptionReason.getErrMsg(this.errCode);
    }
  }

  @override
  String toString() {
    return 'NetError{errCode: $errCode, errMsg: $errMsg, data:$data}';
  }

}
